package com.library.domain;


import com.library.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 图书借阅表 bo_borrow
 *
 * @author wanghongjie
 * @date 2020-01-18
 */
@Data
public class BoBorrow extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Integer id;
    /**
     * 借阅时间
     */
    private Date borrowTime;
    /**
     * 归还时间
     */
    private Date returnTime;
    /**
     * 借阅押金
     */
    private Integer borrowDeposit;
    /**
     * 押金类型
     */
    private String depositType;
    /**
     * 会员ID
     */
    private Long membersId;
    /**
     * 图书ID
     */
    private Long bookId;
    /**
     * 会员实体类
     */
    private BoMembers members;
    /**
     * 图书实体类
     */
    private BoBook boBook;
    /**
     * 借阅状态 (0:未归还 1:已归还)
     */
    private String status;
    /**
     * 扩展字段1
     */
    private String ext1;
    /**
     * 扩展字段2
     */
    private String ext2;
    /**
     * 扩展字段3
     */
    private String ext3;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("borrowTime", getBorrowTime())
                .append("returnTime", getReturnTime())
                .append("borrowDeposit", getBorrowDeposit())
                .append("depositType", getDepositType())
                .append("membersId", getMembersId())
                .append("bookId", getBookId())
                .append("status", getStatus())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("ext1", getExt1())
                .append("ext2", getExt2())
                .append("ext3", getExt3())
                .toString();
    }
}
